<template>
  <User :username="username" :age="age" class="d1"></User>
</template>

<script>
import {ref, reactive, toRefs,computed,watchEffect,watch} from 'vue'
import User from "./components/User.vue";

export default {
  name: 'App',
  components:{
    User
  },
  setup() {
    const user = reactive({
      username:'aaa',
      age:18
    })
    return {...toRefs(user)}
  }
}
</script>

<style scoped>
/* 样式 */
.d1{
  color: blue;
}
</style>